package com.aiyan.edu.service.learning.controller;

import com.aiyan.edu.api.learning.CourseLearningControllerApi;
import com.aiyan.edu.framework.domain.learning.respones.GetMediaResult;
import com.aiyan.edu.framework.web.BaseController;
import com.aiyan.edu.service.learning.service.CourseLearningService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: zqzhou
 * @create: 2019/11/20 23:24
 **/
@RestController
@RequestMapping("/learning/course")
public class CourseLearningController extends BaseController implements CourseLearningControllerApi {

    @Autowired
    CourseLearningService courseLearningService;

    @Override
    @GetMapping("/media/{courseId}/{coursePlanId}")
    public GetMediaResult findMedia(@PathVariable("courseId") String courseId, @PathVariable("coursePlanId") String coursePlanId) {
        return this.courseLearningService.findMedia(courseId, coursePlanId);
    }
}
